package com.zhouxl.upgrade;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * 短息发布监听器
 * @author zhouxl
 * @DATE 2021/6/22
 * @descriptoin
 */
@Component
public class SmsListener implements ApplicationListener<OrderCreateEvent> {
    @Override
    public void onApplicationEvent(OrderCreateEvent event) {
        //发送短信
        System.out.println(event.getArgs().get(0) + ",您的订单:" + event.getArgs().get(1) + "创建成功! ----by sms");
    }
}
